package router

import (
	"go_final/mxshop_api/order_web/api/order"
	"go_final/mxshop_api/order_web/api/pay"
	middlewares "go_final/mxshop_api/order_web/middleware"

	"github.com/gin-gonic/gin"
)

func InitOrderRouter(Router *gin.RouterGroup) {
	OrderRouter := Router.Group("order").Use(middlewares.JWTAuth())

	{
		OrderRouter.GET("", order.List)
		OrderRouter.POST("", order.New)
		OrderRouter.GET(":id", order.Detail)
	}

	PayRouter := Router.Group("pay")
	{
		PayRouter.POST("alipay/notify", pay.Notify)
	}
}
